import 'package:cook_dinner/config/include.dart';
import 'package:cook_dinner/index.dart';
import 'package:cook_dinner/widgets/input.dart';
import 'package:flutter/material.dart';

class LoginPageInt extends StatefulWidget {
  const LoginPageInt({Key? key}) : super(key: key);

  @override
  State<LoginPageInt> createState() => _LoginPageIntState();
}

class _LoginPageIntState extends State<LoginPageInt> {
  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      padding: EdgeInsets.only(left: 18.rpx, right: 18.rpx, top: 42.rpx),
      child: Padding(
        padding: EdgeInsets.symmetric(horizontal: 26.rpx),
        child: Column(
          children: [
            Container(
              width: double.infinity,
              height: 52.rpx,
              margin: EdgeInsets.only(bottom: 24.rpx),
              decoration: BoxDecoration(
                color: const Color(0xffd3d2d8).withOpacity(0.3),
                borderRadius: BorderRadius.circular(10.rpx),
              ),
              child: Row(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Expanded(
                    child: textInput(
                      hintText: '账号',
                      fontSize: 20.rpx,
                      length: 11,
                      contentPadding: EdgeInsets.only(left: 25.rpx),
                    ),
                  ),
                ],
              ),
            ),
            Container(
              width: double.infinity,
              height: 52.rpx,
              margin: EdgeInsets.only(bottom: 24.rpx),
              decoration: BoxDecoration(
                color: const Color(0xffd3d2d8).withOpacity(0.3),
                borderRadius: BorderRadius.circular(10.rpx),
              ),
              child: Row(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Expanded(
                    child: textInput(
                      hintText: '密码',
                      fontSize: 20.rpx,
                      length: 6,
                      contentPadding: EdgeInsets.only(left: 25.rpx),
                    ),
                  ),
                  Icon(
                    Icons.remove_red_eye,
                    size: 20.rpx,
                    color: const Color(0xffA6A7A2),
                  ),
                  SizedBox(width: 11.rpx),
                ],
              ),
            ),
            InkWell(
              onTap: () {
                AppTo.goto(context, const IndexPage());
              },
              child: Container(
                width: 312.rpx,
                height: 48.rpx,
                margin: EdgeInsets.only(top: 60.rpx, bottom: 66.rpx),
                alignment: Alignment.center,
                decoration: BoxDecoration(
                  color: const Color(0xffFBC508),
                  borderRadius: BorderRadius.circular(10.rpx),
                ),
                child: Text(
                  '登录',
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 20.rpx,
                  ),
                ),
              ),
            ),
            Text(
              '其他登陆选项',
              style:
                  TextStyle(color: const Color(0xffA6A7A2), fontSize: 14.rpx),
            ),
            Padding(
              padding: EdgeInsets.only(top: 25.rpx, bottom: 30.rpx),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceAround,
                children: [
                  Image.asset(
                    'assets/images/qq.png',
                    width: 31.rpx,
                    height: 31.rpx,
                  ),
                  Image.asset(
                    'assets/images/wx.png',
                    width: 35.rpx,
                    height: 35.rpx,
                  ),
                  Image.asset(
                    'assets/images/wb.png',
                    width: 31.rpx,
                    height: 31.rpx,
                  ),
                ],
              ),
            ),
            Row(
              crossAxisAlignment: CrossAxisAlignment.center,
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Icon(
                  Icons.check_circle_sharp,
                  color: const Color(0xffFBC508),
                  size: 17.rpx,
                ),
                SizedBox(width: 7.rpx),
                Text(
                  '我已阅读并同意',
                  style: TextStyle(
                      fontSize: 12.rpx, color: Colors.black, height: 1),
                ),
                Text(
                  '《用户协议》',
                  style: TextStyle(
                      fontSize: 12.rpx,
                      color: const Color(0xffFBC508),
                      height: 1),
                ),
                Text(
                  '和',
                  style: TextStyle(
                      fontSize: 12.rpx, color: Colors.black, height: 1),
                ),
                Text(
                  '《隐私协议》',
                  style: TextStyle(
                      fontSize: 12.rpx,
                      color: const Color(0xffFBC508),
                      height: 1),
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
